package com.daumcorp.searchdata.web;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;

@Controller
@RequestMapping("/flashmap")
public class FlashMapTestController {
	@RequestMapping
	public String flashMap(RedirectAttributes redirectAttributes) {
		redirectAttributes.addFlashAttribute("flashtest", true);
		return "redirect:/flashmap/final";
	}

	@RequestMapping("/final")
	public String flashMapFinal(Model model) {
		System.out.println(model.asMap().get("flashtest"));
		return "flashfinal";
	}
}